#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/5/13 16:22
# @Author  : XH
# @File    : users.py
# @Software: PyCharm
# 定义员工管理类
from Framework.Http_token import Request
from api.apienv import get_host
from api.get_token import get_token

"""
关于用户管理的接口在这个模块封装
"""
class UserApi:
    host = get_host()
    def query_user(self,header,data):
        request = Request(
            method="GET",
            host=self.host,
            path="/api/permission/Users",
            query = data,
            headers=header
        )
        response = request.send()
        return response

if __name__ == '__main__':
    data = {
        # "n":1747363653,
        "organizeId":"None",
        "keyword":"TestA",
        "currentPage":1,
        "pageSize":20,
        "sort":"desc"
    }
    token = get_token()
    header = {"Authorization": token}
    res = UserApi().query_user(header,data)
    print(res.json())


